import React, { Component } from 'react'
import { View, Text, Clipboard, TouchableOpacity } from 'react-native'
import {Toast} from 'native-base'
import commonStyle from '../../../libs/commonStyle'

export default class Tips extends Component {
	copy(text, tips) {
		Clipboard.setString(String(text))
		this.props.showDialog && this.props.showDialog(tips)
	}
	render() {
		return (
			<View
				style={[commonStyle.mt20]}
			>
				<View style={[
					commonStyle.flexRow,
					commonStyle.flexJustifyBetween,
					commonStyle.p30,
					commonStyle.backgroundColorWhite]}>
				<View
					style={[
						commonStyle.flexRow,
						commonStyle.flexVerticalCenter,
						commonStyle.mb10
					]}
				>
					<Text
						style={[
							commonStyle.colorGray,
							commonStyle.f24
							// commonStyle.mb10
						]}
					>
						有疑问加客服微信号：
					</Text>
					<TouchableOpacity
						onPress={() => {
							this.copy(this.props.info.wechat, '已复制客服微信')
						}}
					>
						<Text
							// numberOfLines={2}
							style={[commonStyle.activeColor]}
						>
							{this.props.info.wechat}
						</Text>
					</TouchableOpacity>
				</View>
				<View
					style={[
						commonStyle.flexRow,
						commonStyle.flexVerticalCenter,
						// commonStyle.pl20,
						// commonStyle.pr20,
						commonStyle.colorGray
						// commonStyle.textRight,
						// commonStyle.flexItem,
						// commonStyle.f24
					]}
				>
					<Text
						style={[
							commonStyle.colorGray,
							commonStyle.f24
							// commonStyle.mb10
						]}
					>
						客服QQ群：
					</Text>
					<TouchableOpacity onPress={() => {
						this.copy(this.props.info.qq, '已复制客服QQ群')
					}}>
						<Text
							// numberOfLines={2}
							style={[commonStyle.activeColor]}
						>
							{this.props.info.qq}
						</Text>
					</TouchableOpacity>
				</View>
				</View>
			</View>
		)
	}
}
